<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        var num1 = 100;
        var num2 = 10;
        //加、减、成、除、取余数
        console.log(num1 + num2);
        console.log(num1 - num2);
        console.log(num1 * num2);
        console.log(num1 / num2);
        console.log(num1 % num2);
        
        //自增或者自减运算符相当于 当前值+1或者-1
        var num3 = 20;
        console.log(++num3);
        console.log(--num3);

        //自增和自减有两种写法 ： ++num num++
        //++在前，先自增再运算。++在后，先运算再自增
        var num4 = 10;
        console.log(num4++);
        console.log(num4);

        
    </script>
</body>
</html>